function assert(value, desc) {
    const li = document.createElement("li");
    li.className = value ? "pass": "fail";
    li.appendChild(document.createTextNode(desc));
    document.getElementById("result").appendChild(li);
}
function report(text) {
    assert(true, text);
}
var text = "Domo arigato";
report("Before defining functions");

function useless(ninjaCallback) {
    report("In useless function");
    return ninjaCallback();
}
function getText() {
    report("In getText function");
    return text
}
report("Before making all the calls");
assert(useless(getText) === text, "The useless function works" + text);

report("After the calls have been made");